home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scrapbookpalette.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-01-29  |  2.8 KB  |  128 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef BIBLIO_H
  8. #define BIBLIO_H
  9.  
  10. #include <QDropEvent>
  11. #include <QDragMoveEvent>
  12. #include <QDragEnterEvent>
  13. #include <QListWidget>
  14.  
  15. class QEvent;
  16.  
  17. #include "scribusapi.h"
  18. #include "scrpalettebase.h"
  19. #include "scribusstructs.h"
  20.  
  21. class QHBoxLayout;
  22. class QToolButton;
  23. class QVBoxLayout;
  24. class QToolBox;
  25. class QPixmap;
  26. class QListWidgetItem;
  27.  
  28. class SCRIBUS_API BibView : public QListWidget
  29. {
  30.     Q_OBJECT
  31.  
  32. public:
  33.     BibView( QWidget* parent);
  34.     ~BibView() {};
  35.     void AddObj(QString name, QString daten, QPixmap Bild);
  36.     void checkAndChange(QString &text, QString nam, QString dir);
  37.     void SaveContents(QString name, QString oldName);
  38.     void ReadOldContents(QString, QString newName);
  39.     void ReadContents(QString name);
  40.     struct Elem
  41.     {
  42.         QString Data;
  43.         QPixmap Preview;
  44.     };
  45.     QMap<QString,Elem> objectMap;
  46.     QString ScFilename;
  47.     bool canWrite;
  48.  
  49. signals:
  50.     void ToggleAllPalettes();
  51.     void Schliessen();
  52.     void CloseMpal();
  53.     void CloseTpal();
  54.     void objDropped(QString text);
  55.  
  56. protected:
  57.     void dragEnterEvent(QDragEnterEvent *e);
  58.     void dragMoveEvent(QDragMoveEvent *e);
  59.     void dropEvent(QDropEvent *e);
  60.     void startDrag(Qt::DropActions supportedActions);
  61. };
  62.  
  63. class SCRIBUS_API Biblio : public ScrPaletteBase
  64. {
  65.     Q_OBJECT
  66.  
  67. public:
  68.     Biblio( QWidget* parent);
  69.     ~Biblio() {};
  70.     
  71.     virtual void changeEvent(QEvent *e);
  72.     
  73.     void ObjFromCopyAction(QString text, QString name);
  74.     void adjustReferences(QString nam);
  75.     void CleanUpTemp();
  76.     void setScrapbookFileName(QString);
  77.     const QString getScrapbookFileName();
  78.     const int objectCount();
  79.     void readContents(QString);
  80.     void readTempContents(QString);
  81.     void readOldContents(QString, QString);
  82.     void installEventFilter(QObject *);
  83.     void setOpenScrapbooks(QStringList &fileNames);
  84.     QStringList getOpenScrapbooks();
  85.     QString getObjectName(QString &text);
  86.     BibView* tempBView;
  87.     BibView* activeBView;
  88.     QListWidgetItem *actItem;
  89.     
  90. public slots:
  91.     void languageChange();
  92.     void ObjFromMenu(QString text);
  93.  
  94. private slots:
  95.     void handleDoubleClick(QListWidgetItem *ite);
  96.     void handlePasteToPage();
  97.     void HandleMouse(QPoint p);
  98.     bool copyObj(int id);
  99.     void moveObj(int id);
  100.     void deleteObj();
  101.     void deleteAllObj();
  102.     void renameObj();
  103.     void NewLib();
  104.     void Load();
  105.     void SaveAs();
  106.     void closeLib();
  107.     void libChanged(int index);
  108.     void Import();
  109.  
  110. signals:
  111.     void updateRecentMenue();
  112.     void pasteToActualPage(QString);
  113.  
  114. protected:
  115.     QToolBox* Frame3;
  116.     QVBoxLayout* BiblioLayout;
  117.     int tempCount;
  118.     QString OldName;
  119.     QHBoxLayout* buttonLayout;
  120.     QToolButton* newButton;
  121.     QToolButton* loadButton;
  122.     QToolButton* saveAsButton;
  123.     QToolButton* importButton;
  124.     QToolButton* closeButton;
  125. };
  126.  
  127. #endif // BIBLIO_H
  128.